package com.xinnet.mms.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
 * 购物车
 * @author 王湛智
 *
 */
public class ShopCart implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String productClass;//产品id
	private String productName;//产品名字
	private String domainName;//域名
	private String agentCode;//用户ID
	private String goodsCodes;//商品code
	private String operateTime;//加入购物车时间
	private String operateTimeRange;//加入购物车时间
	private String operateTimeStart;//加入购物车开始时间
	private String operateTimeEnd;//加入购物车结束时间
	private String purchaseCategory;//购买类型
	private String goodsName;//商品类型
	private String companyName;//商品类型
	private String purchaseYears;//数量
	private String timeUnit;//单位
	private List<String> empnoList;//查询用
	private String productContent;//产品内容
	private String empId; //销售ID
	private String empno; 
	private String deptno;//部门编号
	private String deptId;//部门ID（编号）
	private Integer limitTop;//分页上标
	private Integer limitDown;//分页下标
	private int rowCount;//
	@SuppressWarnings("unused")
	private String purchaseTime;//购买时长
	
	
	public ShopCart() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	

	public ShopCart(String productClass, String productName, String domainName,
			String agentCode, String goodsCodes, String operateTime,
			String operateTimeRange, String operateTimeStart,
			String operateTimeEnd, String purchaseCategory, String goodsName,
			String companyName, String purchaseYears, String timeUnit,
			List<String> empnoList, String productContent, String empId,
			String empno, String deptno, String deptId, Integer limitTop,
			Integer limitDown, int rowCount, String purchaseTime,
			String companyAbb) {
		super();
		this.productClass = productClass;
		this.productName = productName;
		this.domainName = domainName;
		this.agentCode = agentCode;
		this.goodsCodes = goodsCodes;
		this.operateTime = operateTime;
		this.operateTimeRange = operateTimeRange;
		this.operateTimeStart = operateTimeStart;
		this.operateTimeEnd = operateTimeEnd;
		this.purchaseCategory = purchaseCategory;
		this.goodsName = goodsName;
		this.companyName = companyName;
		this.purchaseYears = purchaseYears;
		this.timeUnit = timeUnit;
		this.empnoList = empnoList;
		this.productContent = productContent;
		this.empId = empId;
		this.empno = empno;
		this.deptno = deptno;
		this.deptId = deptId;
		this.limitTop = limitTop;
		this.limitDown = limitDown;
		this.rowCount = rowCount;
		this.purchaseTime = purchaseTime;
	}



	public String getProductClass() {
		return productClass;
	}
	public void setProductClass(String productClass) {
		this.productClass = productClass;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public String getDomainName() {
		return domainName;
	}
	public void setDomainName(String domainName) {
		this.domainName = domainName;
	}
	public String getAgentCode() {
		return agentCode;
	}
	public void setAgentCode(String agentCode) {
		this.agentCode = agentCode;
	}
	public String getGoodsCodes() {
		return goodsCodes;
	}
	public void setGoodsCodes(String goodsCodes) {
		this.goodsCodes = goodsCodes;
	}
	public String getOperateTime() {
		return operateTime;
	}
	public void setOperateTime(String operateTime) {
		this.operateTime = operateTime;
	}
	public String getPurchaseCategory() {
		
		return purchaseCategory;
	}
	public void setPurchaseCategory(String purchaseCategory) {
		this.purchaseCategory = purchaseCategory;
	}
	public String getGoodsName() {
		return goodsName;
	}
	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}
	public String getCompanyName() {
		return companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	public String getPurchaseYears() {
		BigDecimal decimal = new BigDecimal(purchaseYears).setScale(0,   BigDecimal.ROUND_HALF_UP);
		return decimal.toString();
	}
	public void setPurchaseYears(String purchaseYears) {
		this.purchaseYears = purchaseYears;
	}
	public String getTimeUnit() {
		return timeUnit;
	}
	public void setTimeUnit(String timeUnit) {
		this.timeUnit = timeUnit;
	}
	public String getPurchaseTime() {
		if(getPurchaseYears()==null||"".equals(getPurchaseYears())){
			return "";
		}
		return getPurchaseYears()+timeUnit;
	}
	public void setPurchaseTime(String purchaseTime) {
		this.purchaseTime = purchaseTime;
	}


	public List<String> getEmpnoList() {
		return empnoList;
	}


	public void setEmpnoList(List<String> empnoList) {
		this.empnoList = empnoList;
	}


	public String getEmpId() {
		return empId;
	}


	public void setEmpId(String empId) {
		this.empId = empId;
	}


	public String getDeptno() {
		return deptno;
	}


	public void setDeptno(String deptno) {
		this.deptno = deptno;
	}


	public String getDeptId() {
		return deptId;
	}


	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}


	public Integer getLimitTop() {
		return limitTop;
	}


	public void setLimitTop(Integer limitTop) {
		this.limitTop = limitTop;
	}


	public Integer getLimitDown() {
		return limitDown;
	}


	public void setLimitDown(Integer limitDown) {
		this.limitDown = limitDown;
	}


	public int getRowCount() {
		return rowCount;
	}


	public void setRowCount(int rowCount) {
		this.rowCount = rowCount;
	}


	public String getEmpno() {
		return empno;
	}


	public void setEmpno(String empno) {
		this.empno = empno;
	}


	public String getOperateTimeRange() {
		return operateTimeRange;
	}


	public void setOperateTimeRange(String operateTimeRange) {
		this.operateTimeRange = operateTimeRange;
	}

	public String getOperateTimeStart() {
		return operateTimeStart;
	}

	public void setOperateTimeStart(String operateTimeStart) {
		this.operateTimeStart = operateTimeStart;
	}

	public String getOperateTimeEnd() {
		return operateTimeEnd;
	}

	public void setOperateTimeEnd(String operateTimeEnd) {
		this.operateTimeEnd = operateTimeEnd;
	}

	public String getProductContent() {
		if(productContent==null||"".equals(productContent)){
			productContent=domainName;
		} else {
			productContent = productContent.replace("userNumbers", "用户数").replace("_", ":").replace("qz", "CC群组数").replace("kj", "企业云盘空间")
			.replace("jk", "邮件归档空间").replace(",", "<br/>");
		}
		return productContent;
	}


	public void setProductContent(String productContent) {
		this.productContent = productContent;
	}

}
